package com.android.hdhe.uhf.reader;

import android.util.Log;

/**
* @Package com.android.hdhe.uhf.reader 
* @Description: TODO(转箱子工具类) 
* @author 郑鸿博   
* @date 2015-12-4 上午11:37:04 
* @version V1.0
 */
public class CaseString {
	
	/**
	 * 转化为周转箱编号 
	 * @param number
	 * @return
	 */
	public static String getBoxNum(String number){
		if(number.length()<14){
			return "";
		}
		String num = number.substring(0,14);
		StringBuffer sb = new StringBuffer();
		try {
			sb.append((char)Integer.parseInt(num.substring(0, 2)));
			sb.append((char)Integer.parseInt(num.substring(2, 4)));
			sb.append(num.substring(4, 10));
			//后面再出现2个大写字母 可以把下面的注释部分解开就能扫描正常的  DL009900ZZ
			sb.append((char)Integer.parseInt(num.substring(10, 12)));
			sb.append((char)Integer.parseInt(num.substring(12, 14)));
		} catch (Exception e) {
			e.printStackTrace();
		}
		return sb.toString();
	}
}
